package com.qf.day04.arr;

import java.util.Scanner;

/**
 * 1、从键盘录入五个名字到数组中，遍历数组输出这五个名字
 */
public class Demo04 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        String[] nameArr = new String[5];

        for (int i = 0; i < 5; i++) {
            System.out.println("请输入名字:");
            String name = scanner.next();
            // 把名字放入数组中
            nameArr[i] = name;
        }

        ArrUtils.printStringArr(nameArr);

    }

}
